package com.example.springbootone.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
public class HelloController {
    @Value("${dname}")
    // 属性名可以不一样
    private String username;
    @Value("${my.number}")
    private int randNum;
    @Value("${my.string}")
    private String randValue;
    @Value("${my.uuid}")
    private UUID uuid;
    @RequestMapping("/hello")
    public String hello(){
        System.out.println(randNum+"*************"+randValue+"&&&"+uuid);
        return "Springboot";
    }
}
